package com.ruoyi.statistic.service.impl;

import com.ruoyi.statistic.domain.StatisticStudentSchoolInfo;
import com.ruoyi.statistic.mapper.StatisticStudentSchoolInfoMapper;
import com.ruoyi.statistic.service.IStatisticStudentSchoolInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class StatisticStudentSchoolInfoServiceImpl implements IStatisticStudentSchoolInfoService {
    @Resource
    private StatisticStudentSchoolInfoMapper statisticStudentSchoolInfoMapper;

    /**
     * 查询学生院校信息
     *
     * @param id 学生院校信息主键
     * @return 学生院校信息
     */
//    @Override
//    public StatisticStudentSchoolInfo selectStatisticStudentSchoolInfoById(Long id) {
//        return statisticStudentSchoolInfoMapper.selectStatisticStudentSchoolInfoById(id);
//    }

    /**
     * 查询学生院校信息列表
     *
     * @param studentSchoolInfo 学生院校信息
     * @return 学生院校信息
     */
//    @Override
//    public List<StatisticStudentSchoolInfo> selectStatisticStudentSchoolInfoList(StatisticStudentSchoolInfo studentSchoolInfo) {
//        return statisticStudentSchoolInfoMapper.selectStatisticStudentSchoolInfoList(studentSchoolInfo);
//    }

    /**
     * 新增学生院校信息
     *
     * @param studentSchoolInfo 学生院校信息
     * @return 结果
     */
    @Override
    public int insertStatisticStudentSchoolInfo(StatisticStudentSchoolInfo studentSchoolInfo) {
        return statisticStudentSchoolInfoMapper.insertStatisticStudentSchoolInfo(studentSchoolInfo);
    }

    /**
     * 修改学生院校信息
     *
     * @param studentSchoolInfo 学生院校信息
     * @return 结果
     */
//    @Override
//    public int updateStatisticStudentSchoolInfo(StatisticStudentSchoolInfo studentSchoolInfo) {
//        return statisticStudentSchoolInfoMapper.updateStatisticStudentSchoolInfo(studentSchoolInfo);
//    }

    /**
     * 批量删除学生院校信息
     *
     * @param ids 需要删除的学生院校信息主键
     * @return 结果
     */
//    @Override
//    public int deleteStatisticStudentSchoolInfoByIds(Long[] ids) {
//        return statisticStudentSchoolInfoMapper.deleteStatisticStudentSchoolInfoByIds(ids);
//    }

    /**
     * 删除学生院校信息信息
     *
     * @param id 学生院校信息主键
     * @return 结果
     */
//    @Override
//    public int deleteStatisticStudentSchoolInfoById(Long id) {
//        return statisticStudentSchoolInfoMapper.deleteStatisticStudentSchoolInfoById(id);
//    }


    /////////////////////////////////////////////////////////////////////////////////////////////////////////
    //额外方法
    /////////////////////////////////////////////////////////////////////////////////////////////////////////


    /**
     * 删除所有数据
     */
    @Override
    public void deleteAll() {
        statisticStudentSchoolInfoMapper.deleteAll();
    }


    /**
     * 聚合学生学籍信息
     */
    public List<StatisticStudentSchoolInfo> aggregationStatisticStudentSchoolInfo() {
        return statisticStudentSchoolInfoMapper.aggregationStatisticStudentSchoolInfo();
    }


    /**
     * 查询聚合学生年级
     *
     * @return
     */
    public List<StatisticStudentSchoolInfo> selectStatisticAggregationGrade() {
        return statisticStudentSchoolInfoMapper.selectStatisticAggregationGrade();
    }

    /**
     * 查询聚合学生系别
     *
     * @return
     */
    public List<StatisticStudentSchoolInfo> selectStatisticAggregationDepartment() {
        return statisticStudentSchoolInfoMapper.selectStatisticAggregationDepartment();
    }


    /**
     * 查询聚合学生专业
     *
     * @return
     */
    public List<StatisticStudentSchoolInfo> selectStatisticAggregationMajor() {
        return statisticStudentSchoolInfoMapper.selectStatisticAggregationMajor();
    }


    /**
     * 查询聚合学生专业
     *
     * @return
     */
    public List<StatisticStudentSchoolInfo> selectStatisticAggregationGraduationYear() {
        return statisticStudentSchoolInfoMapper.selectStatisticAggregationGraduationYear();
    }
}
